#pragma once

#include "EngineObject.h"

template<class T>
class ItemDator : public EngineObject
{
public:
	~ItemDator() { delete target; }
	ItemDator(T* t) : target(t) {}
	BaseDator& operator =(string& input) { target=toVal(input); return *this; }
	bool operator ==(T& s) { return s==(*target); }
	bool operator !=(T& s) { return s!=(*this); }
	T* operator->() const { return target; }

	AUTO_SIZE;
protected:
	T* target;
};
